{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 一.原理介绍\n",
    "这一节将树模型的预测与概率分布相结合，我们假设树模型的输出服从某一分布，而我们的目标是使得该输出的概率尽可能的高，如下图所示\n",
    "![avatar](./source/10_集成学习_极大似然估计.png)\n",
    "\n",
    "而概率值最高的点通常由分布中的某一个参数（通常是均值）反映，所以我们将树模型的输出打造为分布中的该参数项，然后让树模型的输出去逼近极大似然估计的结果即可，即：   \n",
    "\n",
    "$$\n",
    "\\hat{y}\\rightarrow \\mu_{ML}\n",
    "$$   \n",
    "\n",
    "下面分别介绍possion回归，gamma回归，tweedie回归，负二项回归的具体求解"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 二.泊松回归\n",
    "泊松分布的表达式如下：    \n",
    "\n",
    "$$\n",
    "P(y\\mid\\lambda)=\\frac{\\lambda^y}{y!}e^{-\\lambda}\n",
    "$$  \n",
    "\n",
    "其中，$y$是我们的目标输出，$\\lambda$为模型参数，且$\\lambda$恰为该分布的均值，由于泊松分布要求$y>0$，所以我们对$\\hat{y}$取指数去拟合$\\lambda$，即令：   \n",
    "\n",
    "$$\n",
    "\\lambda=e^{\\hat{y}}\n",
    "$$   \n",
    "\n",
    "对于$N$个样本，其似然函数可以表示如下：  \n",
    "\n",
    "$$\n",
    "\\prod_{i=1}^N\\frac{e^{y_i\\hat{y_i}}e^{-e^{\\hat{y_i}}}}{y_i!}\n",
    "$$   \n",
    "\n",
    "由于$y_i!$是常数，可以去掉，并对上式取负对数，转换为求极小值的问题：  \n",
    "\n",
    "$$\n",
    "L(y,\\hat{y})=\\sum_{i=1}^N(e^{\\hat{y_i}}-y_i\\hat{y_i})\n",
    "$$  \n",
    "\n",
    "所以，一阶导和二阶导分别为：   \n",
    "\n",
    "$$\n",
    "\\frac{\\partial L(y,\\hat{y})}{\\partial \\hat{y}}=e^{\\hat{y}}-y\\\\\n",
    "\\frac{\\partial^2 L(y,\\hat{y})}{{\\partial \\hat{y}}^2}=e^{\\hat{y}}\\\\\n",
    "$$   "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 三.gamma回归\n",
    "gamma分布如下：   \n",
    "\n",
    "$$\n",
    "p(y\\mid\\alpha,\\lambda)=\\frac{1}{\\Gamma(\\alpha)\\lambda^\\alpha}y^{\\alpha-1}e^{-y/\\lambda}\n",
    "$$  \n",
    "\n",
    "其中，$y>0$为我们的目标输出，$\\alpha$为形状参数，$\\lambda$为尺度参数，$\\Gamma(\\cdot)$为Gamma函数（后续推导这里会被省略，所以就不列出来了），而Gamma分布的均值为$\\alpha\\lambda$，这里不好直接变换，我们令$\\alpha=1/\\phi,\\lambda=\\phi\\mu$，所以现在Gamma分布的均值可以表示为$\\mu$，此时的Gamma分布为：   \n",
    "\n",
    "$$\n",
    "p(y\\mid\\mu,\\phi)=\\frac{1}{y\\Gamma(1/\\phi)}(\\frac{y}{\\mu\\phi})^{1/\\phi}exp[-\\frac{y}{\\mu\\phi}]\n",
    "$$  \n",
    "\n",
    "此时，$\\mu$看做Gamma分布的均值参数，而$\\phi$为它的离散参数，在均值给定的情况下，若离散参数越大，Gamma分布的离散程度越大，接下来对上面的表达式进一步变换：   \n",
    "\n",
    "$$\n",
    "p(y\\mid\\mu,\\phi)=exp[\\frac{-y/\\mu-ln\\mu}{\\phi}+\\frac{1-\\phi}{\\phi}lny-\\frac{ln\\phi}{\\phi}-ln\\Gamma(\\frac{1}{\\phi})]\n",
    "$$  \n",
    "\n",
    "同泊松分布一样，我们可以令：   \n",
    "\n",
    "$$\n",
    "\\mu=e^{\\hat{y}}\n",
    "$$  \n",
    "\n",
    "又由于$\\mu$与$\\phi$无关，所以做极大似然估计时可以将$\\phi$看做常数，我们将对数似然函数的负数看做损失函数，可以写作如下：   \n",
    "\n",
    "$$\n",
    "L(y,\\hat{y})=\\sum_{i=1}^N(\\frac{y_i}{e^{\\hat{y_i}}}+\\hat{y_i})\n",
    "$$  \n",
    "\n",
    "所以，一阶导和二阶导就可以写出来啦：   \n",
    "\n",
    "$$\n",
    "\\frac{\\partial L(y,\\hat{y})}{\\partial \\hat{y}}=1-ye^{-\\hat{y}}\\\\\n",
    "\\frac{\\partial^2 L(y,\\hat{y})}{{\\partial \\hat{y}}^2}=ye^{-\\hat{y}}\\\\\n",
    "$$  \n",
    "\n",
    "注意：上面的两个向量是按元素相乘"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 四.tweedie回归\n",
    "tweedie回归是多个分布的组合体，包括gamma分布，泊松分布，高斯分布等，tweedie回归由一个超参数$p$控制，$p$不同，则其对应的对数似然函数也不同：   \n",
    "\n",
    "$$\n",
    "g(y,\\phi)+\\left\\{\\begin{matrix}\n",
    "\\frac{1}{\\phi}(ylog(\\mu)-\\frac{\\mu^{2-p}}{2-p}) &  p=1\\\\ \n",
    "\\frac{1}{\\phi}(y\\frac{\\mu^{1-p}}{1-p}-log\\mu) & p=2 \\\\ \n",
    "\\frac{1}{\\phi}(y\\frac{\\mu^{1-p}}{1-p}-\\frac{\\mu^{2-p}}{2-p}) & p\\neq 1,p\\neq 2\n",
    "\\end{matrix}\\right.\n",
    "$$  \n",
    "\n",
    "同样的，我们可以令：   \n",
    "\n",
    "$$\n",
    "\\mu=e^{\\hat{y}}\n",
    "$$  \n",
    "\n",
    "由于除开$\\mu$以外的都可以视作常数项，所以损失函数可以简化为：   \n",
    "\n",
    "$$\n",
    "L(y,\\hat{y})=\\left\\{\\begin{matrix}\n",
    "\\sum_{i=1}^n(\\frac{e^{\\hat{y_i}(2-p)}}{2-p}-y_i\\hat{y_i})=\\sum_{i=1}^n(e^{\\hat{y_i}}-y_i\\hat{y_i}) &  p=1\\\\ \n",
    "\\sum_{i=1}^n(\\hat{y_i}+y_ie^{-\\hat{y_i}}) & p=2 \\\\ \n",
    "\\sum_{i=1}^n(\\frac{exp[\\hat{y_i}(2-p)]}{2-p}-y_i\\frac{exp[\\hat{y_i}(1-p)]}{1-p}) & p\\neq 1,p\\neq 2\n",
    "\\end{matrix}\\right.\n",
    "$$   \n",
    "\n",
    "所以，一阶导：   \n",
    "\n",
    "$$\n",
    "\\frac{\\partial L(y,\\hat{y})}{\\partial \\hat{y}}=\\left\\{\\begin{matrix}\n",
    "e^{\\hat{y}}-y &  p=1\\\\ \n",
    "1-ye^{-\\hat{y}} & p=2 \\\\ \n",
    "e^{\\hat{y}(2-p)}-ye^{\\hat{y}(1-p)} & p\\neq 1,p\\neq 2\n",
    "\\end{matrix}\\right.\n",
    "$$\n",
    "\n",
    "二阶导：   \n",
    "\n",
    "$$\n",
    "\\frac{\\partial^2 L(y,\\hat{y})}{{\\partial \\hat{y}}^2}=\\left\\{\\begin{matrix}\n",
    "e^{\\hat{y}} &  p=1\\\\ \n",
    "ye^{-\\hat{y}} & p=2 \\\\ \n",
    "(2-p)e^{\\hat{y}(2-p)}-(1-p)ye^{\\hat{y}(1-p)} & p\\neq 1,p\\neq 2\n",
    "\\end{matrix}\\right.\n",
    "$$"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 五.代码实现\n",
    "基于上一节的计算框架，略作调整即可实现...."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "os.chdir('../')\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline\n",
    "from ml_models.ensemble import XGBoostBaseTree\n",
    "from ml_models import utils\n",
    "import copy\n",
    "import numpy as np\n",
    "\n",
    "\"\"\"\n",
    "xgboost回归树的实现，封装到ml_models.ensemble\n",
    "\"\"\"\n",
    "\n",
    "class XGBoostRegressor(object):\n",
    "    def __init__(self, base_estimator=None, n_estimators=10, learning_rate=1.0, loss='squarederror', p=2.5):\n",
    "        \"\"\"\n",
    "        :param base_estimator: 基学习器\n",
    "        :param n_estimators: 基学习器迭代数量\n",
    "        :param learning_rate: 学习率，降低后续基学习器的权重，避免过拟合\n",
    "        :param loss:损失函数，支持squarederror、logistic、poisson,gamma,tweedie\n",
    "        :param p:对tweedie回归生效\n",
    "        \"\"\"\n",
    "        self.base_estimator = base_estimator\n",
    "        self.n_estimators = n_estimators\n",
    "        self.learning_rate = learning_rate\n",
    "        if self.base_estimator is None:\n",
    "            # 默认使用决策树桩\n",
    "            self.base_estimator = XGBoostBaseTree()\n",
    "        # 同质分类器\n",
    "        if type(base_estimator) != list:\n",
    "            estimator = self.base_estimator\n",
    "            self.base_estimator = [copy.deepcopy(estimator) for _ in range(0, self.n_estimators)]\n",
    "        # 异质分类器\n",
    "        else:\n",
    "            self.n_estimators = len(self.base_estimator)\n",
    "        self.loss = loss\n",
    "        self.p = p\n",
    "\n",
    "    def _get_gradient_hess(self, y, y_pred):\n",
    "        \"\"\"\n",
    "        获取一阶、二阶导数信息\n",
    "        :param y:真实值\n",
    "        :param y_pred:预测值\n",
    "        :return:\n",
    "        \"\"\"\n",
    "        if self.loss == 'squarederror':\n",
    "            return y_pred - y, np.ones_like(y)\n",
    "        elif self.loss == 'logistic':\n",
    "            return utils.sigmoid(y_pred) - utils.sigmoid(y), utils.sigmoid(y_pred) * (1 - utils.sigmoid(y_pred))\n",
    "        elif self.loss == 'poisson':\n",
    "            return np.exp(y_pred) - y, np.exp(y_pred)\n",
    "        elif self.loss == 'gamma':\n",
    "            return 1.0 - y * np.exp(-1.0 * y_pred), y * np.exp(-1.0 * y_pred)\n",
    "        elif self.loss == 'tweedie':\n",
    "            if self.p == 1:\n",
    "                return np.exp(y_pred) - y, np.exp(y_pred)\n",
    "            elif self.p == 2:\n",
    "                return 1.0 - y * np.exp(-1.0 * y_pred), y * np.exp(-1.0 * y_pred)\n",
    "            else:\n",
    "                return np.exp(y_pred * (2.0 - self.p)) - y * np.exp(y_pred * (1.0 - self.p)), (2.0 - self.p) * np.exp(\n",
    "                    y_pred * (2.0 - self.p)) - (1.0 - self.p) * y * np.exp(y_pred * (1.0 - self.p))\n",
    "\n",
    "    def fit(self, x, y):\n",
    "        y_pred = np.zeros_like(y)\n",
    "        g, h = self._get_gradient_hess(y, y_pred)\n",
    "        for index in range(0, self.n_estimators):\n",
    "            self.base_estimator[index].fit(x, g, h)\n",
    "            y_pred += self.base_estimator[index].predict(x) * self.learning_rate\n",
    "            g, h = self._get_gradient_hess(y, y_pred)\n",
    "\n",
    "    def predict(self, x):\n",
    "        rst_np = np.sum(\n",
    "            [self.base_estimator[0].predict(x)] +\n",
    "            [self.learning_rate * self.base_estimator[i].predict(x) for i in\n",
    "             range(1, self.n_estimators - 1)] +\n",
    "            [self.base_estimator[self.n_estimators - 1].predict(x)]\n",
    "            , axis=0)\n",
    "        if self.loss in [\"poisson\", \"gamma\", \"tweedie\"]:\n",
    "            return np.exp(rst_np)\n",
    "        else:\n",
    "            return rst_np"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "对泊松、gamma、tweedie回归做测试"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "data = np.linspace(1, 10, num=100)\n",
    "target = np.sin(data) + np.random.random(size=100) + 1  # 添加噪声\n",
    "data = data.reshape((-1, 1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x29c33c1a9b0>]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3XuUHOV55/HvI81IGmlGGt24aHQ1xrLxDWXHNjZexxEk+AboEDu2c3CCw4ZDHJzgeNkV3qydODm2HNZmOYtjIgccnPUCvnBkjHEwj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5MdZu7fyHt9qTJ3a9198XuvpzcZNlGd2/b3pm7PwfsNLOV+YfOA55IsUlpehY4x8xm5v9mzqNNJ5dLFPacJv/120mcJNQ2ezLJucCHgJ+b2WP5xz6R345Q5KPA18xsGvAU8OGU25MKd3/IzL4JPEouw2wLbbZS1cxuA94OLDCzXcCngHXA183scnIXwES2KNUKVRGRDNKwjIhIBim4i4hkkIK7iEgGKbiLiGSQgruISAYpuIuIZJCCu4hIBim4i4hk0P8HAeiIGS4vhEcAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x29c33c43e80>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "model = XGBoostRegressor(loss='poisson')\n",
    "model.fit(data, target)\n",
    "plt.scatter(data, target)\n",
    "plt.plot(data, model.predict(data), color='r')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x29c33c1a400>]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3X9wXGd97/H317Jsy7YUWbGT2PKvtJiQhBQbTAi47WUcikNCY5PSJnQKDeUSflMYbsBhBmiZuWCGTn5QKMGQXJKWG+jQ1IQSbm7AcIEAIc4PSpwQMElqWzaJgyPLP+RYsr/3j7Mrr1Z7ds/unrPn7NnPa0Yja3W05/Fq9T3PeZ7v833M3RERkXyZlnYDREQkfgruIiI5pOAuIpJDCu4iIjmk4C4ikkMK7iIiOaTgLiKSQwruIiI5pOAuIpJD09M68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wkym1+OkZl+LZe5ec6FQasE9D8xsm7uvTrsdWaHX4yS9FpPp9TipVa+FhmVERHJIwV1EJIcU3JuzOe0GZIxej5P0Wkym1+OklrwWGnMXEckh9dxFRHJIwb0BZrbEzL5nZo+a2XYz+9u025Q2M+syswfN7D/SbkvazKzfzL5uZr8svEdennab0mJm7y/8jTxsZreZ2ay029RKZnazmT1tZg+XPDZgZneb2a8Ln+clcW4F98aMAx9w97OBC4B3VdhXttP8LfBo2o3IiBuA/+PuLwBeRIe+LmY2CLwXWO3uLySoKttpFWO/DFxU9thG4LvuvgL4buHr2Cm4N8Dd97r7A4V/HyT44+3YYuNmthi4BPhS2m1Jm5n1AX9MUAYbdz/m7sPptipV04GewiY+s5m60U+uufsPmLpxUeme07cAG5I4t4J7k8xsObAKuDfdlqTqeuCDwIm0G5IBvwfsA/5XYZjqS2Y2J+1GpcHdh4B/AHYCe4ED7v5/021VJpzu7nsh6CgCpyVxEgX3JpjZXODfgPe5+0ja7UmDmb0WeNrd70+7LRkxHXgx8Hl3XwUcJqHb7qwrjCWvB84EFgFzzOyv0m1V51Bwb5CZdRME9q+4++1ptydFa4BLzexJ4KvAWjP7l3SblKrdwG53L97JfZ0g2HeiVwFPuPs+dx8DbgdekXKbsuApM1sIUPj8dBInUXBvgJkZwZjqo+5+bdrtSZO7X+Pui919OcFk2VZ379jembv/FthlZmcVHroQeCTFJqVpJ3CBmc0u/M1cSIdOLpcp7jlN4fM3kjhJpG32ZIo1wBuBX5jZQ4XHPlzYjlDkPcBXzGwG8Djw5pTbkwp3v9fMvg48QJBh9iAdtlLVzG4DXgnMN7PdwMeATcC/mtlbCC6AiWxRqhWqIiI5pGEZEZEcUnAXEckhBXcRkRxScBcRySEFdxGRHFJwFxHJIQV3EZEcUnAXEcmh/w84QatzaJzquwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x29c33bfbe80>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "model = XGBoostRegressor(loss='gamma')\n",
    "model.fit(data, target)\n",
    "plt.scatter(data, target)\n",
    "plt.plot(data, model.predict(data), color='r')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x29c33c1aba8>]"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3XuUXWV9//H3N8lM5pIhI7mRTBISMI1y0aQE5NJaGluDoJKFF8D+bP0t+ktRUelq81sBW1FXW2Lpgh/WaxSqVgu0SANqLFZivaCCkUQil2gUhEwCCcJkkswkmUm+vz/OOZMzJ+ey9zl7n33OPp/XWrPCnLPn7IczZ7772d/n+zyPuTsiIpIuE5JugIiIRE/BXUQkhRTcRURSSMFdRCSFFNxFRFJIwV1EJIUU3EVEUkjBXUQkhRTcRURSaFJSJ54+fbovWLAgqdOLiDSln/70py+4+4xKxyUW3BcsWMCmTZuSOr2ISFMys98EOa5iWsbMOszsYTP7mZk9ZmYfKXLMZDO7y8y2m9lDZrYgfJNFRCQqQXLuh4Dl7v5qYAlwkZmdW3DMVcBL7v5y4BbgY9E2U0REwqgY3D1jf/bbtuxX4VKSlwJfzP733cDrzMwia6WIiIQSqFrGzCaa2RZgN/Df7v5QwSF9wLMA7j4K7AWmRdlQEREJLlBwd/cj7r4EmAucY2ZnFBxSrJd+3ELxZrbKzDaZ2aY9e/aEb62IiAQSqs7d3QeA/wEuKnhqBzAPwMwmAVOBF4v8/Dp3X+buy2bMqFjJIyIiVapYCmlmM4ARdx8ws07g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JnZRDPbbGZfT7otSTOzXjO728yezH5Gzku6TUkxs7/M/o383MzuMLOOpNtUT2Z2u5ntNrOf5z12opn9t5n9Mvvvy+I4t4J7dUaBv3L3VwLnAu8tsq9sq/kA8ETSjWgQtwL/5e6vAF5Ni74vZtYHvB9Y5u5nkFlVttVWjP0CcFHBY2uAB9x9EfBA9vvIKbhXwd13ufsj2f/eR+aPt2UXGzezucAlwOeTbkvSzOwE4LVklsHG3Q+7+0CyrUrUJKAzu4lPF8dv9JNq7v49jt+4KH/P6S8CK+M4t4J7jcxsAbAUeCjZliTq/wH/FziadEMawCnAHuBfsmmqz5tZd9KNSoK79wP/BDwD7AL2uvu3km1VQ5jl7rsg01EEZsZxEgX3GpjZFOCrwLXuPph0e5JgZm8Edrv7T5NuS4OYBPwu8Gl3XwocIKbb7kaXzSVfCiwE5gDdZva/km1V61Bwr5KZtZEJ7F9x93uSbk+CLgDebGZPA3cCy83sy8k2KVE7gB3unruTu5tMsG9FfwQ85e573H0EuAc4P+E2NYLnzWw2QPbf3XGcRMG9CmZmZHKqT7j7zUm3J0nufp27z3X3BWQGyza6e8v2ztz9OeBZM1ucfeh1wOMJNilJzwDnmllX9m/mdbTo4HKB3J7TZP+9N46TBNpmT45zAfBOYKuZbck+dn12O0KR9wFfMbN24NfA/064PYlw94fM7G7gETIVZptpsZmqZnYHcCEw3cx2ADcAa4F/N7OryFwAY9miVDNURURSSGkZEZEUUnAXEUkhBXcRkRRScBcRSSEFdxGRFFJwFxFJIQV3EZEUUnAXEUmh/w+5sqxAUTktwQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x29c33c36be0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "model = XGBoostRegressor(loss='tweedie',p=2.5)\n",
    "model.fit(data, target)\n",
    "plt.scatter(data, target)\n",
    "plt.plot(data, model.predict(data), color='r')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x29c33c43d68>]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3X9wXOV97/H317Isy5Zk4R/EtjAWDhhIoMGpw4/yI4whIUASHJqW5E47oeEOlyakJbcl4zDT0OTObdyhLSVDmsQJ+dkUyCXEIYWGtHEyoYRfBpOA40BccLBlFwuwZNkSsmx97x+7K6+kPbtnd8/Zs3v285rRSDo62vN4vfruc77P83wfc3dERCRdZiTdABERiZ6Cu4hICim4i4ikkIK7iEgKKbiLiKSQgruISAopuIuIpJCCu4hICim4i4ik0MykLrxw4ULv7e1N6vIiIg3pySeffMXdF5U6L7Hg3tvby+bNm5O6vIhIQzKz34Y5r2Raxsxmm9njZvYLM9tqZp8ucE6bmd1tZtvN7DEz6y2/ySIiEpUwOfdRYI27vwU4A3iXmZ095ZxrgH3ufiJwK/C30TZTRETKUTK4e8aB7Let2Y+ppSSvAL6R/foe4CIzs8haKSIiZQk1W8bMWszsaWAv8O/u/tiUU3qAnQDufhgYBBZE2VAREQkvVHB39yPufgZwHHCmmZ025ZRCvfRpheLN7Foz22xmm/v7+8tvrYiIhFLWPHd3HwB+Crxryo92AcsAzGwmMA94rcDvb3D31e6+etGikjN5RESkQiWnQprZImDM3QfMrB24mOkDpvcBHwIeAd4PbHJt8STSlDZu6eOWB59j98AIS7vbufGSk1m7qifpZjWdMPPclwDfMLMWMj3977j7v5rZZ4DN7n4fcAfwLTPbTqbH/oHYWiwidWvjlj4+ee8zjIwdAaBvYIRP3vsMgAJ8jZUM7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y6gAvIlMHG3Q+5+0CyrUrUTKA9u4nPHKZv9JNq7v4zpm9clL/n9DeAtXFcW8G9SmbWC6wCHku2JYn6R+ATwHjSDakDK4B+4GvZNNVXzGxu0o1Kgrv3AX8HvATsAQbd/UfJtqouvMHd90CmowgcG8dFFNyrYGYdwHeBG9x9f9LtSYKZvRvY6+5PJt2WOjETeCvwBXdfBRwkptvuepfNJV8BnAAsBeaa2R8l26rmoeBeITNrJRPYv+3u9ybdngSdC7zXzHYAdwFrzOyfk21SonYBu9w9dyd3D5lg34wuBl509353HwPuBX4v4TbVg5fNbAlA9vPeOC6i4F4BMzMyOdVt7v4PSbcnSe7+SXc/zt17yQyWbXL3pu2duft/AzvN7OTsoYuAXyXYpCS9BJxtZnOyfzMX0aSDy1Pk9pwm+/n7cVwk1DZ7Ms25wB8Dz5jZ09ljN2W3IxT5GPBtM5sFvAD8ScLtSYS7P2Zm9wBPkZlhtoUmW6lqZncCFwILzWwXcDOwHviOmV1D5g0wli1KtUJVRCSFlJYREUkhBXcRkRRScBcRSSEFdxGRFFJwFxFJIQV3EZEUUnAXEUkhBXcRkRT6/zesmxuh2qn1AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x29c33b6f128>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "model = XGBoostRegressor(loss='tweedie',p=1.5)\n",
    "model.fit(data, target)\n",
    "plt.scatter(data, target)\n",
    "plt.plot(data, model.predict(data), color='r')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "上面的拟合结果，看不出明显区别....,接下来对tweedie分布中`p`取极端值做一个简单探索...，可以发现取值过大或者过小都有可能陷入欠拟合"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x29c44ed2cc0>]"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    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neb5AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x29c44daf208>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "model = XGBoostRegressor(loss='tweedie',p=0.1)\n",
    "model.fit(data, target)\n",
    "plt.scatter(data, target)\n",
    "plt.plot(data, model.predict(data), color='r')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x29c44e94f28>]"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAG19JREFUeJzt3X+QXWV9x/H3l2TBBVrWmm2BDTEwMlSBMbE7iM1Mhwl2QKCQoThgp4506GRQqNKxdBb/8Af/EMeOkRmsThQqWAZwMANRqdQx7aipUjcQRUiZZgAlIZVFWBSzxsR8+8e9S27u3rP3nHufc57z4/Oa2cnu3cPeh7Nnv+c53+f7PI+5OyIiUi9HxW6AiIiEp+AuIlJDCu4iIjWk4C4iUkMK7iIiNaTgLiJSQwruIiI1pOAuIlJDCu4iIjW0NNYbL1u2zFeuXBnr7UVEKmn79u0vuvt4v+OiBfeVK1cyPT0d6+1FRCrJzH6a5ri+aRkze52Z/beZ/cjMnjCzT/Q45hgzu8/MdpnZI2a2MnuTRUQklDQ59/3AWnd/K7AKuNDMzu065hrgZXd/E7AR+GTYZoqISBZ9g7u3vNr+cqT90b2U5GXAne3P7wfONzML1koREckkVbWMmS0xsx3AC8C33P2RrkMmgOcA3P0g8ArwhpANFRGR9FIFd3f/nbuvApYD55jZWV2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jzdJtc2eLLAGeC/wuJntaL/2kfZ2hCJ/B9xtZkcDTwN/E7k9Ubj7I2Z2P/AorQqzx2jYTFUzuwc4D1hmZruBjwEbgK+Y2TW0boC5bFGqGaoiIjWktIyISA0puIuI1JCCu4hIDSm4i4jUkIK7iEgNKbiLiNSQgruISA0puIuI1ND/A7n9C8BB8jMDAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x29c44e41390>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "model = XGBoostRegressor(loss='tweedie',p=20)\n",
    "model.fit(data, target)\n",
    "plt.scatter(data, target)\n",
    "plt.plot(data, model.predict(data), color='r')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "参考内容：  \n",
    "http://www.doc88.com/p-9029670237688.html  \n",
    "http://docs.h2o.ai/h2o/latest-stable/h2o-docs/data-science/glm.html#families"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
